﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp.动态属性
{
    public class test
    { 
        public static void MainUnit()
        {
            dynamic P = new DynamicInputParams(); 
            P.Name = "张三";
            P.Age = 22;
            P.Sex = "女";
            Console.WriteLine(P.Name);
            //也可以添加到List集合
            List<dynamic> List = new List<dynamic>();
            List.Add(P);
            foreach (var item in List)
            {
                Console.WriteLine(item.Name);
            }
        }
    }
}
